﻿Imports System
Imports System.IO
Imports System.Net
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Navigation
Partial Public Class About
    Public Sub New()
        MyBase.New()
        Me.InitializeComponent()
        Dim A As String
        A = Me.Version.Text.Replace("{1}", My.Application.Info.Version.Major)
        A = A.Replace("{2}", My.Application.Info.Version.Minor)
        A = A.Replace("{3}", My.Application.Info.Version.BuildString)
        Me.Version.Text = A
    End Sub
    Private Sub Titlebar_MouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles Titlebar.MouseLeftButtonDown
        Me.DragMove()
    End Sub
    Private Sub Close_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles CloseButton.MouseDown
        Dim ISC As New ImageSourceConverter
        CloseButton.Source = ISC.ConvertFrom("pack://application:,,,/Images/Close-pressed.png")
    End Sub
    Private Sub Close_MouseEnter(ByVal sender As Object, ByVal e As System.Windows.Input.MouseEventArgs) Handles CloseButton.MouseEnter
        Dim ISC As New ImageSourceConverter
        CloseButton.Source = ISC.ConvertFrom("pack://application:,,,/Images/close-hover.png")
    End Sub
    Private Sub Close_MouseLeave(ByVal sender As Object, ByVal e As System.Windows.Input.MouseEventArgs) Handles CloseButton.MouseLeave
        Dim ISC As New ImageSourceConverter
        CloseButton.Source = ISC.ConvertFrom("pack://application:,,,/Images/close.png")
    End Sub
    Private Sub Close_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles CloseButton.MouseUp
        Dim ISC As New ImageSourceConverter
        CloseButton.Source = ISC.ConvertFrom("pack://application:,,,/Images/close.png")
        GC.Collect()
        Me.Close()
    End Sub
    Private Sub OKButton_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles OKButton.Click
        GC.Collect()
        Me.Close()
    End Sub
End Class
